/**********************************************
 * 	Adjective.java							  *
 *  Course: CS3343							  *
 *  Version: 2.0     Release 1				  *
 *  Last Modified : 22 MAR 2013			      *
 **********************************************/
package checker;

public class Adjective extends Word {

	public Adjective(String sign){
		super(sign,"Adjective");
	}

	public Adjective() {
		super("[adj]","Noun");
		
	}

	public boolean isOfType(String word) {
		// get all the words starting with the letter same as the initial letter of the input word
		// the second argument is the type of words to be retrieved, in this case, adjectives
		// the return value is an array containing all the relevant words
		String[] adjectives = fileIO.getWordCategory(word, "adjective");
		// simply compare each value in the array with the input word
		for (int i = 0; i < adjectives.length; i++) {
			if (adjectives[i].equalsIgnoreCase(word))
				// returning true means this is an adjective
				return true;
		}
		return false;
	}

}